<template>
    <header class="header">
        <div class="container">
            <div class="header-logo">
                <img src="@/assets/images/header/logo.png" alt="" srcset="">

                <div class="header-toggle">
                    <div class="header-toggle__1"></div>
                    <div class="header-toggle__2"></div>
                </div>
            </div>
            <ul class="header-meun">
                <li class="header-meun__item active">
                    <nuxt-link to="/">迅科教育</nuxt-link>
                </li>
                <li class="header-meun__item">
                    <nuxt-link to="/summary">迅科简介</nuxt-link>
                </li>
                <li class="header-meun__item">
                    <span href="javascript:;">金牌课程</span>
                    <ul class="header-meun-child">
                        <li class="header-meun-child__item">
                            <nuxt-link to="/f2e">WEB</nuxt-link>
                        </li>
                        <li class="header-meun-child__item">
                            <nuxt-link to="/ui">UI</nuxt-link>
                        </li>
                        <li class="header-meun-child__item">
                            <nuxt-link to="/java">Java</nuxt-link>
                        </li>
                    </ul>
                </li>
                <li class="header-meun__item">
                    <nuxt-link to="/expert">专家师资</nuxt-link>
                </li>
                <li class="header-meun__item">
                    <nuxt-link to="/works">学员作品</nuxt-link>
                </li>
                <li class="header-meun__item">
                    <nuxt-link to="/student">就业动态</nuxt-link>                    
                </li>
                <li class="header-meun__item">
                    <nuxt-link to="/news">新闻动态</nuxt-link>  
                </li>
                <li class="header-meun__item">
                    <nuxt-link to="/content">联系我们</nuxt-link>
                </li>
            </ul>
        </div>
    </header>
</template>

<script>
export default {

}
</script>

<style>
.header{
    height: 87px;
}
.header-logo{
    float: left;
    height: 87px;
    display: flex;
    justify-content: center;
    flex-direction: column;
}
.header-meun{
    height: 87px;
    list-style: none;
    float: right;
    display: flex;
    align-items: center;
}
.header-meun__item{
    margin-right: 40px;
    position: relative;
}
.header-meun__item .nuxt-link-exact-active::after,
.header-meun__item:hover a::after{
    content: '';
    position: absolute;
    left: 50%;
    bottom: -15px;
    width: 40px;
    height: 2px;
    transform: translate3d(-50%, 0, 0);
    background: #0090ff;
}
.header-meun__item a{
    text-decoration: none;
    color: #2d2d2d;
}
.header-meun__item:hover .header-meun-child{
    display: block;
}
.header-meun-child{
    margin: 0;
    padding: 0;
    list-style: none;
    position: absolute;
    background: #fff;
    padding: 15px;
    width: 100%;
    transform: translate(-15px, 20px);
    box-sizing: content-box;
    text-align: center;
    box-shadow: 0 0 5px 1px #aaa;
    display: none;
}
.header-meun-child__item{
    padding: 10px 0;
}
.header-meun-child__item a{
    display: block;
}
.header-meun-child::after{
    content: '';
    display: block;
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
}
.header-meun-child__item a::after{
    display: none;
}
@media screen and (max-width: 480px) {
    .header{
        height: auto;
        border-bottom: 1px solid #d4d4d4;
    }
    .header-toggle{
        width: 50px;
        height: 50px;
        position: absolute;
        right: 15px;
        display: none;
    }
    .header-toggle__1, .header-toggle__2{
        width: 100%;
        height: 100%;
        position: absolute;
    }
    .header-toggle__1::after,
    .header-toggle__2::after,
    .header-toggle__1::before,
    .header-toggle__2::before{
        transition: all .5s;
    }
    .header-toggle__1::after{
        content: '';
        display: block;
        width: 100%;
        height: 2px;
        background: #d4d4d4;
        position: absolute;
        top: 10px;
        left: 0;
    }
    .header-toggle__1::before{
        content: '';
        display: block;
        width: 70px;
        height: 2px;
        background: #d4d4d4;
        position: absolute;
        top: 24px;
        left: -10px;
        transform: rotate(45deg);
    }
    .header-toggle__2::after{
        content: '';
        display: block;
        width: 100%;
        height: 2px;
        background: #d4d4d4;
        position: absolute;
        bottom: 10px;
        left: 0;
    }

    .header-toggle__2::before{
        content: '';
        display: block;
        width: 70px;
        height: 2px;
        background: #d4d4d4;
        position: absolute;
        top: 24px;
        left: -10px;
        transform: rotate(-45deg);
    }

    /* .header-toggle::after{
        content: '';
        display: block;
        width: 100%;
        height: 2px;
        background: #d4d4d4;
        position: absolute;
        top: 10px;
        left: 0;
    }
    .header-toggle::before{
        content: '';
        display: block;
        width: 100%;
        height: 2px;
        background: #d4d4d4;
        position: absolute;
        bottom: 10px;
        left: 0;
    } */
    .header-logo{
        float: none;
        flex-direction: row;
        align-items: center;
        position: relative;
    }
    .header-meun{
        width: 100%;
        padding: 0;
        height: auto;
        float: none;
        flex-direction: column;
        text-align: center;
    }
    .header-meun__item{
        margin-right: 0;
        width: 100%;
        padding: 5px 0;
    }
    .header-meun__item .nuxt-link-exact-active::after, .header-meun__item:hover::after{
        width: 100%;
        height: 100%;
        opacity: .7;
        bottom: 0;
        z-index: -1;
    }
    .header-meun__item .nuxt-link-exact-active{
        color: #fff;
    }
    .header-meun__item:hover a{
        color: #fff;
    }
}
</style>
